package com.moss.cloud.plugins.biz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.moss.cloud.plugins.api.model.from.BaseFrom;
import com.moss.cloud.plugins.api.model.from.DataSourceConfFrom;
import com.moss.cloud.plugins.api.model.param.DataSourceConfParam;
import com.moss.cloud.plugins.biz.model.DataSourceConf;

/**
 * 数据源配置业务接口
 *
 * @author 瑾年
 * @date 2024年1月3日
 */
public interface IDataSourceConfService extends IService<DataSourceConf> {

    /**
     * 新增数据源配置
     *
     * @param dataSourceConfFrom
     * @return
     */
    boolean saveDataSourceConf(DataSourceConfFrom dataSourceConfFrom);

    /**
     * 更新数据源配置
     *
     * @param dataSourceConfFrom
     * @return
     */
    boolean updateDataSourceConf(DataSourceConfFrom dataSourceConfFrom);

    /**
     * 删除数据源配置
     *
     * @param baseFrom
     * @return
     */
    boolean removeDataSourceConf(BaseFrom baseFrom);

    /**
     * 数据源配置分页查询
     *
     * @param dataSourceConfParam
     * @return
     */
    IPage<DataSourceConf> page(DataSourceConfParam dataSourceConfParam);
}
